"); outputFrame.close(); } function drawBranch(startNode,structureString) { var children = extractChildrenOf(startNode); var currentIndex = 1; while (currentIndex <= children.length) { outputFrame.write(structureString); if (children[currentIndex].type == 'link') { if (children[currentIndex].icon == "") { var imageString = defaultImageURL + defaultLinkIcon; } else {var imageString = defaultImageURL + children[currentIndex].icon} if (children[currentIndex].target == "") { var targetFrame = defaultTargetFrame; } else {var targetFrame = children[currentIndex].target} if (currentIndex != children.length) { outputFrame.write("") } else { outputFrame.write("") } outputFrame.write("" + children[currentIndex].url + " " + children[currentIndex].name + "
\n") } else { var newStructure = structureString; if (children[currentIndex].iconClosed == "") {var iconClosed = "img-folder-closed-" + structureStyle + ".gif"} else {var iconClosed = children[currentIndex].iconClosed} if (children[currentIndex].iconOpen == "") {var iconOpen = "img-folder-open-" + structureStyle + ".gif"} else {var iconOpen = children[currentIndex].iconOpen} if (currentIndex != children.length) { if (children[currentIndex].open == 0) { outputFrame.write("Click to open this folder") outputFrame.write("Click to open this folder " + children[currentIndex].name + "
\n") } else { outputFrame.write("Click to close this folder"); outputFrame.write("Click to close this folder " + children[currentIndex].name + "
\n"); newStructure = newStructure + ""; drawBranch(children[currentIndex].id,newStructure); } } else { if (children[currentIndex].open == 0) { outputFrame.write("Click to open this folder") outputFrame.write("Click to open this folder " + children[currentIndex].name + "
\n") } else { outputFrame.write("Click to close this folder"); outputFrame.write("Click to close this folder " + children[currentIndex].name + "
\n"); newStructure = newStructure + ""; drawBranch(children[currentIndex].id,newStructure); } } } currentIndex++; } } function toggleFolder(id,status) { var nodeIndex = indexOfNode(id); treeData[nodeIndex].open = status; timeOutId = setTimeout("drawTree()",100)} function indexOfNode(id) { var currentIndex = 1; while (currentIndex <= treeData.length) { if ((treeData[currentIndex].type == 'root') || (treeData[currentIndex].type == 'folder')) { if (treeData[currentIndex].id == id) {return currentIndex}} currentIndex++} return -1} function extractChildrenOf(node) { var children = new Collection(); var currentIndex = 1; while (currentIndex <= treeData.length) { if ((treeData[currentIndex].type == 'folder') || (treeData[currentIndex].type == 'link')) { if (treeData[currentIndex].parent == node) { children.add(treeData[currentIndex])}} currentIndex++} return children} function Collection() { this.length = 0; this.add = add; return this} function add(object) { this.length++; this[this.length] = object} function RootNode(id,name,url,target,icon) { this.id = id; this.name = name; this.url = url; this.target = target; this.icon = icon; this.type = 'root'; return this} function FolderNode(id,parent,name,iconClosed,iconOpen) { this.id = id; this.parent = parent; this.name = name; this.iconClosed = iconClosed; this.iconOpen = iconOpen; this.type = 'folder'; this.open = 0; return this} function LinkNode(parent,name,url,target,icon) { this.parent = parent; this.name = name; this.url = url; this.target = target; this.icon = icon; this.type = 'link'; return this} function loadData() { treeData = new Collection(); treeData.add(new RootNode('root','Main','welcome.html','','')); // Root Node MUST be first! treeData.add(new FolderNode('bg','root','Български','','')); treeData.add(new LinkNode('bg','За центъра','page2.html','','')); treeData.add(new FolderNode('serv','bg','Услуги','','')); treeData.add(new LinkNode('serv','Общи услуги','page4.html','','')); treeData.add(new FolderNode('pres','serv','Представяния','','')); treeData.add(new LinkNode('pres','Маркетингови представяния','page4.html#marketing','','')); treeData.add(new LinkNode('pres','По заявка от клиент','page4.html#taylor','','')); treeData.add(new LinkNode('pres','Технически представяния','page4.html#techno','','')); treeData.add(new LinkNode('bg','Нашият екип','team_bg.html','','img-page-globe.gif')); treeData.add(new LinkNode('bg','Полезни препратки','page6.html','','img-page-link.gif')); treeData.add(new LinkNode('bg','Адрес и телефони','address.html','','')); treeData.add(new FolderNode('eng','root','English','','')); treeData.add(new LinkNode('eng','About the center','page1.html','','')); treeData.add(new FolderNode('services','eng','Services','','')); treeData.add(new LinkNode('services','General','page3.html','','')); treeData.add(new FolderNode('present','services','Presentations','','')); treeData.add(new LinkNode('present','For customers','page3.html#cust','','')); treeData.add(new LinkNode('present','Taylor - made','page3.html#taylor','','')); treeData.add(new LinkNode('present','Technical','page3.html#techno','','')); treeData.add(new LinkNode('eng','ISDN Demo Team','team.html','','')); treeData.add(new LinkNode('eng','Useful links','page5.html','','img-page-link.gif')); treeData.add(new LinkNode('eng','Address and telephones','address.html','','')); treeData.add(new FolderNode('sites','root','Обучение','','')); treeData.add(new LinkNode('sites','Ръководства','training.html','','')); treeData.add(new LinkNode('sites','Проекти','blank.html','','')); treeData.add(new FolderNode('hardware','root','Производители на хардуер','','')); treeData.add(new LinkNode('hardware','Видеооборудване','videoeq.html','','')); treeData.add(new LinkNode('hardware','Централи и телефони','pbx.html','','')); treeData.add(new LinkNode('hardware','Рутери и платки','routers.html','','')); treeData.add(new FolderNode('otherdc','root','ISDN центрове в страната','','')); treeData.add(new LinkNode('otherdc','РУД - Стара Загора','http://www.infotel.bg/~rud-sz/','','img-page-link.gif')); treeData.add(new LinkNode('otherdc','Бизнес център - ж.к. Дружба','undercon.html','','img-page-link.gif')); treeData.add(new LinkNode('otherdc','ISDN център - Пловдив','undercon.html','','img-page-link.gif')); treeData.add(new LinkNode('otherdc','ISDN център - Бургас','undercon.html','','img-page-link.gif')); treeData.add(new LinkNode('otherdc','Бизнес център - Плевен','undercon.html','','img-page-link.gif')); treeData.add(new LinkNode('otherdc','Бизнес център - Варна','undercon.html','','img-page-link.gif')); treeData.add(new LinkNode('root','E-Mail','mailto:isdndemo.sf.bg','','img-email.gif')); structureStyle = 0; // 0 for light background, 1 for dark background backgroundColor = '#FFFFFF'; // sets the bgColor of the menu textColor = '#000000'; // sets the color of the text used in the menu linkColor = '#0000AA'; // sets the color of any text links (usually defined in additional HTML sources) aLinkColor = '#FF0000'; // sets the active link color (when you click on the link) vLinkColor = '#880088'; // sets the visited link color backgroundImage = 'backgrnd.gif'; // give the complete path to a gif or jpeg to use as a background image defaultTargetFrame = 'pageFrame'; // the name of the frame that links will load into by default defaultImageURL = ''; // the URL or path where the OmenTree images are located defaultLinkIcon = 'img-page-globe.gif'; // the default icon image used for links omenTreeFont = 'MS Sans Serif,Arial,Helvetica'; // the font used for the menu omenTreeFontSize = 2; // its size - don't make it too big! prefixHTML = ""; suffixHTML = ""; } // End Hiding -->